package master;

import javax.swing.JFrame;


import master.userInterface.WorkspacePanel;

/**
 * Workspace provides interface between the user and a quantum network
 * @author Luke Dobinson
 */

public class Workspace {
	QuantumNetwork quantumNetwork;//the network in use by the workspace
	final String name; public String getName(){return name;}
	
	public Workspace(String name, QuantumNetwork network){
		this.name = name;
		this.quantumNetwork = network;
	}
	public WorkspacePanel getPanel(){
		return new WorkspacePanel(this);
	}
	public QuantumNetwork getWorkingNetwork(){
		return quantumNetwork;
	}
	public void setWorkingNetwork(QuantumNetwork quantumNetwork){
		this.quantumNetwork = quantumNetwork;
	}
	public static void main(String [] args){
		Workspace c = new Workspace("hello",new QuantumNetwork(new QuantumRegister(2)));
		JFrame f = new JFrame();
		f.getContentPane().add(c.getPanel());
		f.setSize(400,400);
		f.setVisible(true);
		f.setTitle(c.getName());
	}
}
